﻿// Decompiled by AS3 Sorcerer 6.12
// www.as3sorcerer.com

//LinkSegment

package 
{
    import flash.display.Sprite;
    import flash.filters.GlowFilter;
    import flash.display.Graphics;

    public class LinkSegment extends Sprite 
    {

        public static const SIZE:Number = 7;
        public static const INTERVAL:Number = 4;

        private var _SafeStr_235:uint = 0;
        private var _SafeStr_120:Number = 0;
        private var _SafeStr_234:Array;
        private var _SafeStr_236:int = 0;

        public function LinkSegment(sync:Sync, baseColor:uint)
        {
            this._SafeStr_120 = (SIZE / 2);
            this._SafeStr_234 = new Array();
            this._SafeStr_235 = baseColor;
            var tendril:Tendril = new Tendril(Tendril.TYPE_WITHOUT_SPOT, this._SafeStr_120, 110, 0, 0.3, 1.3, false, sync);
            addChild(tendril);
            this._SafeStr_234.push(tendril);
            tendril = new Tendril(Tendril.TYPE_WITHOUT_SPOT, this._SafeStr_120, -110, 0, 0.3, 1.3, true, sync);
            addChild(tendril);
            this._SafeStr_234.push(tendril);
        }

        public function setSize(size:Number):void
        {
            var t:Tendril;
            this._SafeStr_120 = (size / 2);
            var i:int;
            while (i < this._SafeStr_234.length)
            {
                t = this._SafeStr_234[i];
                t.setBaseRadius(this._SafeStr_120);
                i++;
            };
            this._SafeStr_93();
        }

        public function get load():int
        {
            return (this._SafeStr_236);
        }

        public function set baseColor(baseColor:uint):void
        {
            this._SafeStr_235 = baseColor;
            this._SafeStr_93();
        }

        public function setTendrilSize(size:Number):void
        {
            var t:Tendril;
            var i:int;
            while (i < this._SafeStr_234.length)
            {
                t = this._SafeStr_234[i];
                t.setSize(size);
                i++;
            };
        }

        public function setLoad(load:int):void
        {
            this._SafeStr_236 = load;
            if (load > 0)
            {
                filters = [new GlowFilter(0xFFFF00, 0.8)];
            }
            else
            {
                filters = null;
            };
        }

        public function get baseColor():uint
        {
            return (this._SafeStr_235);
        }

        private function _SafeStr_93():void
        {
            var gr:Graphics = this.graphics;
            gr.clear();
            gr.lineStyle(1, GUI.OUTLINE_COLOR);
            gr.drawCircle(0, 0, this._SafeStr_120);
            gr.lineStyle();
            gr.beginFill(this._SafeStr_235);
            gr.drawCircle(0, 0, (this._SafeStr_120 - 1));
            gr.endFill();
        }

        public function destruct():void
        {
            var t:Tendril;
            graphics.clear();
            var i:int;
            while (i < this._SafeStr_234.length)
            {
                t = this._SafeStr_234[i];
                t.destruct();
                i++;
            };
        }


    }
}//package 

// _SafeStr_120 = "_-6L" (String#4954, DoABC#2)
// _SafeStr_234 = "_-2T" (String#4773, DoABC#2)
// _SafeStr_235 = "_-2J" (String#4765, DoABC#2)
// _SafeStr_236 = "_-4c" (String#4868, DoABC#2)
// _SafeStr_93 = "_-1j" (String#4736, DoABC#2)


